package com.qf.git2204.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

@RestController
@RequestMapping("/test")
public class TestController {
    @GetMapping("/test1/{name1}")
    public HashMap<String,Object> test1(@PathVariable("name1") String name){
        System.out.println(name);
        HashMap<String,Object> map = new HashMap<>();
        map.put("code","1");
        map.put("msg",name);
        return map;
    }
}
